<template>
  <BaseContainer>
    <aplid-base-crud ref="crud" class="w-100" v-bind="{...baseConfig,...$attrs}">
      <template v-slot:accessDialog="{row,show}">
        <AccessForm :nowRowData="row" v-if="show" @refresh="handleRefresh"></AccessForm>
      </template>
      <template v-slot:detailDialog="{row,show}">
        <AccessDetail :nowRowData="row" v-if="show" @refresh="handleRefresh"></AccessDetail>
      </template>
    </aplid-base-crud>
  </BaseContainer>
</template>

<script setup>
import {baseConfig} from './config'
import AccessForm from './AccessForm/index.vue'
import AccessDetail from './AccessDetail/index.vue'

const crud = ref(null)
const handleRefresh = (query, visible = false) => {
	nextTick(() => {
		crud.value.refreshChange(query)
	})
}


</script>

<style lang="scss" scoped></style>
